package com.wf.demo.sys.service;

import com.wf.demo.sys.dao.MenuDAO;
import com.wf.demo.sys.pojo.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: wf
 * @Date: 2019/12/31 11:19
 * @Description:
 */
@Service
public class MenuService {
    @Autowired
    MenuDAO menuDAO;
    public List<Menu> list(){
        Sort sort = new Sort(Sort.Direction.ASC,"id");
        return menuDAO.findAll(sort);
    }
}
